-- GENERATED SPELL FOR [Giant Plains Creeper] --


function spell0_2565(pUnit, Event) --@Encasing Webs,n/a--
pUnit:FullCastSpellOnTarget(4962,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2565', 8000, 1)
end

function spell1_2565(pUnit, Event) --@Poison,n/a--
pUnit:FullCastSpellOnTarget(744,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2565', 30000, 1)
end

function Sorts_2565(pUnit, Event)
local choix_sorts_2565 = math.random(0, 1)
if choix_sorts_2565 == 0 then
pUnit:RegisterEvent('spell0_2565', 1, 1)
end
if choix_sorts_2565 == 1 then
pUnit:RegisterEvent('spell1_2565', 1, 1)
end
end

function mob2565_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_2565', math.random(1500, 3000), 1)
end

function mob2565_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2565_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2565_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(2565, 1, 'mob2565_Action')
RegisterUnitEvent(2565, 2, 'mob2565_Leave')
RegisterUnitEvent(2565, 3, 'mob2565_Kill')
RegisterUnitEvent(2565, 4, 'mob2565_Die')
